//checkoutcontroller is an action watcher package edu.unc.comp410.colemangeer.checkoutdemo;
package edu.unc.comp410.colemangeer.checkoutdemo;

import org.apache.log4j.Logger;

import edu.unc.comp410.colemangeer.model.ShoppingCart;

public class CheckoutController {  //checkoutController has a customer
	
	private static Logger log = Logger.getLogger(CheckoutController.class);
	private Integer customerToCheckout;
	private Customer customerBeingCheckedOut;
	private Double checkoutState;
	
	//constructor - initialize a controller when a user clicks "checkout"
	public CheckoutController( Customer theCustomer ){
		checkForCart();
		customerBeingCheckedOut = theCustomer;
	}
	
	public void beginCheckout(){
		checkoutState = 0.0;
	}
	
	public void CompleteCheckout(){
		Order finalOrder = new Order( customerBeingCheckedOut.getCart() );
		log.warn("Checkout controller completeCheckout()");
		checkoutState = 5.0;
	}

	public void checkForCart(){
		//if no cart, then throw an error - maybe handle with try - catch 
	}

}
